package com.nulldev.util.scripting.cup.instruction_sets.sil.insts;

import com.nulldev.util.scripting.cup.instructions.CupInstruction;

public class DivideOperation implements CupInstruction {

	public static final String[] INST_ARGS =
		{ "A:AREG", "B:COBJ" };

	private final Object[] instructionArguments;

	public DivideOperation(final Object... instArgs) {
		this.instructionArguments = instArgs;
	}

	@Override
	public String getDisplayableInstructionName() {
		return "DIV";
	}

	@Override
	public int getInstructionID() {
		return 9;
	}

	@Override
	public int getInstructionArgumentsCount() {
		return 2;
	}

	@Override
	public String[] getDefaultInstructionArguments() {
		return INST_ARGS;
	}

	@Override
	public int getOptionalInstructionArguments() {
		return 0;
	}

	@Override
	public int getRequiredInstructionArguments() {
		return 2;
	}

	@Override
	public Object[] getInstructionArguments() {
		return this.instructionArguments;
	}

}
